package adv5;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Read1 {

	public static void main(String[] args) {
		InputStream in = null;
		try {
			in = new FileInputStream("E:\\作业\\java56\\11-17-作业.txt");
			// int i = in.read();
			// System.out.println(i);
			// i = in.read();
			// System.out.println(i);
			int ch = 0;
			while ((ch = in.read()) > -1) {
				// 字母没有问题，汉字只有一半
				System.out.println((char) ch);
			}
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		} finally {
			if (in != null)
				try {
					in.close();
				} catch (IOException e) {
					// TODO 自动生成的 catch 块
					e.printStackTrace();
				}
		}

	}
}
